"""
This package provides classes of vectors and rotations for physics calculations.

vector is a standalone wrapping of five ROOT classes (currently from version 5.22):
  + TVector2
  + TVector3
  + TLorentzRotation
  + TRotation
  + TLorentzRotation

In vector these have been renamed as follows to avoid confusion with PyROOT:
  + Vector2
  + Vector3
  + Vector4
  + Rotation
  + LorentzRotation

In addition, the ten corresponding ROOT source files:
  + TVector2.h, TVector2.cxx
  + TVector3.h, TVector3.cxx
  + TLorentzVector.h, TLorentzVector.cxx
  + TRotation.h, TRotation.cxx
  + TLorentzRotation.h, TLorentzRotation.cxx
  
in this package have been amalgamated into three C++ header files:
  + Vector2.hpp
  + Vector3.hpp
  + Vector4.hpp

where Vector3.hpp also contains the definitions for Rotation, and Vector4.hpp also contains
definitions for LorentzRotation.

Except for the name changes, the interface to the classes, function names, etc, are
*identical* to those of the corresponding ROOT classes. The only known discrepancies
with the ROOT interface are the `[]' and `()' operators, which are omitted because
their implementation in Python is significantly different than in C++. 


Future plans:
 + Implement Python exceptions for error conditions (currently the package imitates 
 ROOT's Warning() and Error() functions)
 + Add support for subscripting operators
"""

__author__  = "Craig Bookwalter <craigb@jlab.org>"
__version__ = "0.8.0"
__all__ = ["Vector2",
           "Vector3",
           "Vector4",
           "Rotation",
           "LorentzRotation"]

import vector
from vector import Rotation, LorentzRotation

def Vector4(px=0.0, py=0.0, pz=0.0, e=0.0):
    if type(px) == type(vector.Vector3()):
        return vector.Vector4(px, float(py))
    elif type(px) == type(vector.Vector4()):
        return vector.Vector4(px)
    else:
        return vector.Vector4(float(px), float(py), float(pz), float(e))
    


def Vector3(px=0.0, py=0.0, pz=0.0):
    if type(px) == type(vector.Vector3()):
        return vector.Vector3(px)
    else:
        return vector.Vector3(float(px), float(py), float(pz))
    

def Vector2(px, py):
    return vector.Vector2(px, py)
